3.1102 \(\int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx\)

Optimal. Leaf size=98 \[ -\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}-\frac {b \cot ^5(c+d x)}{5 d} \]

[Out]

-1/16*a*arctanh(cos(d*x+c))/d-1/5*b*cot(d*x+c)^5/d-1/16*a*cot(d*x+c)*csc(d*x+c)/d+1/8*a*cot(d*x+c)*csc(d*x+c)^
3/d-1/6*a*cot(d*x+c)^3*csc(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.17, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2838, 2611, 3768, 3770, 2607, 30} \[ -\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}-\frac {b \cot ^5(c+d x)}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^4*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

-(a*ArcTanh[Cos[c + d*x]])/(16*d) - (b*Cot[c + d*x]^5)/(5*d) - (a*Cot[c + d*x]*Csc[c + d*x])/(16*d) + (a*Cot[c
 + d*x]*Csc[c + d*x]^3)/(8*d) - (a*Cot[c + d*x]^3*Csc[c + d*x]^3)/(6*d)

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2838

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)
*(x_)]), x_Symbol] :> Dist[a, Int[(g*Cos[e + f*x])^p*(d*Sin[e + f*x])^n, x], x] + Dist[b/d, Int[(g*Cos[e + f*x
])^p*(d*Sin[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, g, n, p}, x]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \cot ^4(c+d x) \csc ^3(c+d x) (a+b \sin (c+d x)) \, dx &=a \int \cot ^4(c+d x) \csc ^3(c+d x) \, dx+b \int \cot ^4(c+d x) \csc ^2(c+d x) \, dx\\ &=-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}-\frac {1}{2} a \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx+\frac {b \operatorname {Subst}\left (\int x^4 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=-\frac {b \cot ^5(c+d x)}{5 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {1}{8} a \int \csc ^3(c+d x) \, dx\\ &=-\frac {b \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}+\frac {1}{16} a \int \csc (c+d x) \, dx\\ &=-\frac {a \tanh ^{-1}(\cos (c+d x))}{16 d}-\frac {b \cot ^5(c+d x)}{5 d}-\frac {a \cot (c+d x) \csc (c+d x)}{16 d}+\frac {a \cot (c+d x) \csc ^3(c+d x)}{8 d}-\frac {a \cot ^3(c+d x) \csc ^3(c+d x)}{6 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 175, normalized size = 1.79 \[ -\frac {a \csc ^6\left (\frac {1}{2} (c+d x)\right )}{384 d}+\frac {a \csc ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \sec ^6\left (\frac {1}{2} (c+d x)\right )}{384 d}-\frac {a \sec ^4\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{64 d}+\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}-\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{16 d}-\frac {b \cot ^5(c+d x)}{5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^4*Csc[c + d*x]^3*(a + b*Sin[c + d*x]),x]

[Out]

-1/5*(b*Cot[c + d*x]^5)/d - (a*Csc[(c + d*x)/2]^2)/(64*d) + (a*Csc[(c + d*x)/2]^4)/(64*d) - (a*Csc[(c + d*x)/2
]^6)/(384*d) - (a*Log[Cos[(c + d*x)/2]])/(16*d) + (a*Log[Sin[(c + d*x)/2]])/(16*d) + (a*Sec[(c + d*x)/2]^2)/(6
4*d) - (a*Sec[(c + d*x)/2]^4)/(64*d) + (a*Sec[(c + d*x)/2]^6)/(384*d)

________________________________________________________________________________________

fricas [B]  time = 0.72, size = 187, normalized size = 1.91 \[ \frac {96 \, b \cos \left (d x + c\right )^{5} \sin \left (d x + c\right ) + 30 \, a \cos \left (d x + c\right )^{5} + 80 \, a \cos \left (d x + c\right )^{3} - 30 \, a \cos \left (d x + c\right ) - 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 15 \, {\left (a \cos \left (d x + c\right )^{6} - 3 \, a \cos \left (d x + c\right )^{4} + 3 \, a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{480 \, {\left (d \cos \left (d x + c\right )^{6} - 3 \, d \cos \left (d x + c\right )^{4} + 3 \, d \cos \left (d x + c\right )^{2} - d\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/480*(96*b*cos(d*x + c)^5*sin(d*x + c) + 30*a*cos(d*x + c)^5 + 80*a*cos(d*x + c)^3 - 30*a*cos(d*x + c) - 15*(
a*cos(d*x + c)^6 - 3*a*cos(d*x + c)^4 + 3*a*cos(d*x + c)^2 - a)*log(1/2*cos(d*x + c) + 1/2) + 15*(a*cos(d*x +
c)^6 - 3*a*cos(d*x + c)^4 + 3*a*cos(d*x + c)^2 - a)*log(-1/2*cos(d*x + c) + 1/2))/(d*cos(d*x + c)^6 - 3*d*cos(
d*x + c)^4 + 3*d*cos(d*x + c)^2 - d)

________________________________________________________________________________________

giac [B]  time = 0.24, size = 201, normalized size = 2.05 \[ \frac {5 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 120 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {294 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} + 120 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 60 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 15 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 12 \, b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 5 \, a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6}}}{1920 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="giac")

[Out]

1/1920*(5*a*tan(1/2*d*x + 1/2*c)^6 + 12*b*tan(1/2*d*x + 1/2*c)^5 - 15*a*tan(1/2*d*x + 1/2*c)^4 - 60*b*tan(1/2*
d*x + 1/2*c)^3 - 15*a*tan(1/2*d*x + 1/2*c)^2 + 120*a*log(abs(tan(1/2*d*x + 1/2*c))) + 120*b*tan(1/2*d*x + 1/2*
c) - (294*a*tan(1/2*d*x + 1/2*c)^6 + 120*b*tan(1/2*d*x + 1/2*c)^5 - 15*a*tan(1/2*d*x + 1/2*c)^4 - 60*b*tan(1/2
*d*x + 1/2*c)^3 - 15*a*tan(1/2*d*x + 1/2*c)^2 + 12*b*tan(1/2*d*x + 1/2*c) + 5*a)/tan(1/2*d*x + 1/2*c)^6)/d

________________________________________________________________________________________

maple [A]  time = 0.34, size = 138, normalized size = 1.41 \[ -\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{6 d \sin \left (d x +c \right )^{6}}-\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{24 d \sin \left (d x +c \right )^{4}}+\frac {a \left (\cos ^{5}\left (d x +c \right )\right )}{48 d \sin \left (d x +c \right )^{2}}+\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{48 d}+\frac {a \cos \left (d x +c \right )}{16 d}+\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{16 d}-\frac {b \left (\cos ^{5}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x)

[Out]

-1/6/d*a/sin(d*x+c)^6*cos(d*x+c)^5-1/24/d*a/sin(d*x+c)^4*cos(d*x+c)^5+1/48/d*a/sin(d*x+c)^2*cos(d*x+c)^5+1/48*
a*cos(d*x+c)^3/d+1/16*a*cos(d*x+c)/d+1/16/d*a*ln(csc(d*x+c)-cot(d*x+c))-1/5/d*b/sin(d*x+c)^5*cos(d*x+c)^5

________________________________________________________________________________________

maxima [A]  time = 0.32, size = 106, normalized size = 1.08 \[ \frac {5 \, a {\left (\frac {2 \, {\left (3 \, \cos \left (d x + c\right )^{5} + 8 \, \cos \left (d x + c\right )^{3} - 3 \, \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{6} - 3 \, \cos \left (d x + c\right )^{4} + 3 \, \cos \left (d x + c\right )^{2} - 1} - 3 \, \log \left (\cos \left (d x + c\right ) + 1\right ) + 3 \, \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {96 \, b}{\tan \left (d x + c\right )^{5}}}{480 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*csc(d*x+c)^7*(a+b*sin(d*x+c)),x, algorithm="maxima")

[Out]

1/480*(5*a*(2*(3*cos(d*x + c)^5 + 8*cos(d*x + c)^3 - 3*cos(d*x + c))/(cos(d*x + c)^6 - 3*cos(d*x + c)^4 + 3*co
s(d*x + c)^2 - 1) - 3*log(cos(d*x + c) + 1) + 3*log(cos(d*x + c) - 1)) - 96*b/tan(d*x + c)^5)/d

________________________________________________________________________________________

mupad [B]  time = 9.52, size = 205, normalized size = 2.09 \[ \frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{128\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{128\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{384\,d}-\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{32\,d}+\frac {b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{2}-2\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+\frac {2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{5}+\frac {a}{6}\right )}{64\,d}+\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{16\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^4*(a + b*sin(c + d*x)))/sin(c + d*x)^7,x)

[Out]

(b*tan(c/2 + (d*x)/2))/(16*d) - (a*tan(c/2 + (d*x)/2)^2)/(128*d) - (a*tan(c/2 + (d*x)/2)^4)/(128*d) + (a*tan(c
/2 + (d*x)/2)^6)/(384*d) - (b*tan(c/2 + (d*x)/2)^3)/(32*d) + (b*tan(c/2 + (d*x)/2)^5)/(160*d) - (cot(c/2 + (d*
x)/2)^6*(a/6 + (2*b*tan(c/2 + (d*x)/2))/5 - (a*tan(c/2 + (d*x)/2)^2)/2 - (a*tan(c/2 + (d*x)/2)^4)/2 - 2*b*tan(
c/2 + (d*x)/2)^3 + 4*b*tan(c/2 + (d*x)/2)^5))/(64*d) + (a*log(tan(c/2 + (d*x)/2)))/(16*d)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*csc(d*x+c)**7*(a+b*sin(d*x+c)),x)

[Out]

Timed out

________________________________________________________________________________________